#import "dfhgwhruebvhrheymournrural.h"
@interface dfhgwhruebvhrheymournrural ()
@property (nonatomic, strong) dispatch_source_t timer;
@end
@implementation dfhgwhruebvhrheymournrural
- (dispatch_source_t)timer {
	if (_timer == nil) {
		_timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_global_queue(0, 0));
		dispatch_source_set_timer(self.timer, DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC, 0);
	}
	return _timer;
}
- (void)startWithAction:(void (^)(void))action {
	if (action) {
		dispatch_source_set_event_handler(self.timer, action);
		dispatch_resume(self.timer);
	}
}
- (void)cancel {
	dispatch_source_cancel(self.timer);
	_timer = nil;
}
- (void)dealloc {
	NSLog(@"定时器释放");
}
@end
